/** @jsxImportSource @emotion/react */
import * as React from "react";
import {
  CCell, Cell, Table, TableBody, TableRow, Text
} from "customize-easy-ui-component";
import { DirectLink } from "../../../routing/Link";
import {检验结论IndNj} from "../../industrial/viewRes";
import {useThreeColumnView} from "../../hook/useThreeColumnSubr";
import {config设备概况} from "./orcBase";
import {检验结论VsNj} from "../viewRes";
// import {config设备概况} from "../../contain/impsaf/orcBase";
// import {检验结论IndNj, } from "../viewRes";

//整个结论报告页
export const 检验结论报告= ({ orc, rep,theme } : { orc: any, rep: any,theme:any}
) => {
  const [firstNode,]=useThreeColumnView({orc, config:config设备概况,slash:true,});
  return <>
    <Text id={'Conclusion'} variant="h2" css={{textAlign:'center', "@media print": {pageBreakBefore: 'always',},}}>
      压力容器年度检查结论报告</Text>
    <Text css={{display: 'flex',flexDirection: 'row-reverse',marginRight: '2rem'
    }}>报告编号：{rep.isp?.no}</Text>
    <Table fixed={ ["14.5%","26%","8.5%","23%","8.5%","%"]  } css={ {borderCollapse: 'collapse' } }  tight  miniw={800}>
      <TableBody>
        <DirectLink  href={`/report/${rep?.modeltype}/ver/${rep?.modelversion}/${rep?.id}/Survey#Survey`}>
          {firstNode}
        </DirectLink>
      </TableBody>
    </Table>
    <Table  fixed={ ["11%","%"]  } css={ {borderCollapse: 'collapse' } } tight  miniw={800}>
        <TableBody>
          <DirectLink href={`/report/${rep?.modeltype}/ver/${rep?.modelversion}/${rep?.id}/Conclusion#Conclusion`}>
          <TableRow >
            <CCell >检验依据</CCell>
            <CCell >TSG 21-2016《固定式压力容器安全技术监察规程》<br/>
              TSG08-2017《特种设备使用管理规则》</CCell>
          </TableRow>
          <TableRow>
            <CCell >问题及其处理</CCell>
            <Cell split={true} ><div css={{minHeight: '5rem', whiteSpace: 'pre-wrap'}}>
              {orc.问题及处 || '／'}
            </div></Cell>
          </TableRow>
          </DirectLink>
        </TableBody>
    </Table>
    {检验结论VsNj({theme, orc, rep})}
  </>;
};

